home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / MODEMPRO / HOST110.ZIP;1 / HOSTUTIL.SCR < prev    next >
Encoding:
Text File  |  1994-05-07  |  2.7 KB  |  77 lines

  1. ' Utility routines for host mode.
  2. '
  3. ' DO NOT COMPILE THIS FILE BY ITSELF!
  4. '
  5. ' This file is a part of the complete HOST.SCR and will not compile
  6. ' alone.  To recompile the host scripts, select Scripts/Compile from
  7. ' the QmodemPro for Windows menu and select HOST.SCR in the "Compile
  8. ' script" dialog box.  This file will automatically be compiled as
  9. ' part of the full script.
  10.  
  11. const SecondsInDay = 86400
  12.  
  13. type DateTimeRec
  14.   D as long
  15.   T as long
  16. end type
  17.  
  18. declare function DMYtoDate lib "winsys" (day as integer, month as integer, year as integer) as long
  19. declare function Today lib "winsys" as long
  20. declare sub wsDateToDateString lib "winsys" alias "DateToDateString" (dest as string, picture as string, julian as long, pack as integer)
  21. declare function HMStoTime lib "winsys" (hour as integer, min as integer, sec as integer) as long
  22. declare sub wsTimeToTimeString lib "winsys" alias "TimeToTimeString" (dest as string, picture as string, t as long, pack as integer)
  23. declare function CurrentTime lib "winsys" as long
  24. declare sub IncDateTime lib "winsys" (dt1 as DateTimeRec, dt2 as DateTimeRec, days as integer, seconds as long)
  25.  
  26. declare sub wsJustPathName lib "winsys" alias "JustPathName" (dest as string, pathname as string)
  27. declare sub wsJustFilename lib "winsys" alias "JustFilename" (dest as string, pathname as string)
  28. declare sub wsAddBackSlash lib "winsys" alias "AddBackSlash" (dest as string, dirname as string)
  29.  
  30. declare sub OemToAnsi lib "keyboard" (src as string, dest as string)
  31. declare sub AnsiToOem lib "keyboard" (src as string, dest as string)
  32. declare function AnsiUpper lib "user" (s as string) as string
  33.  
  34. function DateToDateString(picture as string, julian as long) as string
  35.   dim buf as string
  36.   buf = space(128)
  37.   call wsDateToDateString(buf, picture, julian, false)
  38.   DateToDateString = buf
  39. end function
  40.  
  41. function TimeToTimeString(picture as string, t as long) as string
  42.   dim buf as string
  43.   buf = space(128)
  44.   call wsTimeToTimeString(buf, picture, t, false)
  45.   TimeToTimeString = buf
  46. end function
  47.  
  48. function JustPathName(pathname as string) as string
  49.   dim buf as string
  50.   buf = space(128)
  51.   call wsJustPathName(buf, pathname)
  52.   JustPathName = buf
  53. end function
  54.  
  55. function JustFilename(pathname as string) as string
  56.   dim buf as string
  57.   buf = space(128)
  58.   call wsJustFilename(buf, pathname)
  59.   JustFilename = buf
  60. end function
  61.  
  62. function AddBackSlash(dirname as string) as string
  63.   dim buf as string
  64.   buf = space(128)
  65.   call wsAddBackSlash(buf, dirname)
  66.   AddBackSlash = buf
  67. end function
  68.  
  69. function OemUpper(s as string) as string
  70.   dim buf as string
  71.   buf = space(len(s))
  72.   call OemToAnsi(s, buf)
  73.   call AnsiUpper(buf)
  74.   call AnsiToOem(buf, buf)
  75.   OemUpper = buf
  76. end function
  77.